<?php
require('../vendor/autoload.php');

use BitWasp\Bitcoin\Key\PrivateKeyFactory;
use BitWasp\Bitcoin\Address\PayToPubKeyHashAddress;
use BitWasp\Bitcoin\Network\NetworkFactory;

$prv = PrivateKeyFactory::create(true);
$p2pkh= new PayToPubKeyHashAddress($prv->getPubKeyHash());

$network = NetworkFactory::bitcoinRegtest();
echo 'p2pkh address@regtest => ' . $p2pkh->getAddress($network) . PHP_EOL;